﻿<tb:ToolBarBase x:Class="SuperQuery.UserControls.ToolBars.QueryToolBar"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:tb="clr-namespace:SuperQuery.UserControls.ToolBars"
             mc:Ignorable="d"
             TextOptions.TextFormattingMode="Display">

    <ToolBar>
        <Button x:Name="btnRunAll" Click="btnRunAll_Click">
            <StackPanel Orientation="Horizontal">
                <Image Height="16" Source="..\..\Icons\run.ico" Style="{StaticResource buttonImage}"/>
                <TextBlock>Run all databases</TextBlock>
            </StackPanel>
        </Button>

        <Button x:Name="btnRunSelected" Click="btnRunSelected_Click">
            <StackPanel Orientation="Horizontal">
                <Image Height="16" Source="..\..\Icons\runselected.ico" Style="{StaticResource buttonImage}"/>
                <TextBlock>Run selected databases</TextBlock>
            </StackPanel>
        </Button>

        <Button x:Name="btnStop" Click="btnStop_Click">
            <StackPanel Orientation="Horizontal">
                <Image Height="16" Source="..\..\Icons\stop.ico" Style="{StaticResource buttonImage}"/>
                <TextBlock>Stop</TextBlock>
            </StackPanel>
        </Button>

        <Label>Query Type:</Label>
        <ComboBox x:Name="cboTypeOfQuery" IsEditable="False"
                  Text="{Binding Path=LoadedQuery.TypeOfQuery, Mode=TwoWay}"
                  Width="70">
            <ComboBoxItem>Auto</ComboBoxItem>
            <ComboBoxItem>Table</ComboBoxItem>
            <ComboBoxItem>Scalar</ComboBoxItem>
        </ComboBox>
        <Label>Time out (sec):</Label>
        <TextBox x:Name="txtTimeOut"
                 Text="{Binding Path=LoadedQuery.TimeOut, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 BorderBrush="Black" Width="40" />
    </ToolBar>
</tb:ToolBarBase>
